package com.jy.borrow.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jy.borrow.mapper.BorrowMapper;
import com.jy.borrow.domain.Borrow;
import com.jy.borrow.service.IBorrowService;

/**
 * 图书借阅记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-29
 */
@Service
public class BorrowServiceImpl implements IBorrowService 
{
    @Autowired
    private BorrowMapper borrowMapper;

    /**
     * 查询图书借阅记录
     * 
     * @param id 图书借阅记录主键
     * @return 图书借阅记录
     */
    @Override
    public Borrow selectBorrowById(Long id)
    {
        return borrowMapper.selectBorrowById(id);
    }

    /**
     * 查询图书借阅记录列表
     * 
     * @param borrow 图书借阅记录
     * @return 图书借阅记录
     */
    @Override
    public List<Borrow> selectBorrowList(Borrow borrow)
    {
        return borrowMapper.selectBorrowList(borrow);
    }

    /**
     * 新增图书借阅记录
     * 
     * @param borrow 图书借阅记录
     * @return 结果
     */
    @Override
    public int insertBorrow(Borrow borrow)
    {
        return borrowMapper.insertBorrow(borrow);
    }

    /**
     * 修改图书借阅记录
     * 
     * @param borrow 图书借阅记录
     * @return 结果
     */
    @Override
    public int updateBorrow(Borrow borrow)
    {
        return borrowMapper.updateBorrow(borrow);
    }

    /**
     * 批量删除图书借阅记录
     * 
     * @param ids 需要删除的图书借阅记录主键
     * @return 结果
     */
    @Override
    public int deleteBorrowByIds(Long[] ids)
    {
        return borrowMapper.deleteBorrowByIds(ids);
    }

    /**
     * 删除图书借阅记录信息
     * 
     * @param id 图书借阅记录主键
     * @return 结果
     */
    @Override
    public int deleteBorrowById(Long id)
    {
        return borrowMapper.deleteBorrowById(id);
    }
}
